﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Alti.SharePoint.SPDataGenerator.Models
{
    public class SPDataField
    {
        public string InternalName { get; set; }

        public string DisplayName { get; set; }

        public string PascalLabel { get; set; }

        private string _Summary;
        public string Summary
        {
            get
            {
                return _Summary;
            }
            set
            {
                _Summary = (value == null ? null : value.Replace(Environment.NewLine, " ").Replace("<", ""));
            }
        }

        public bool Hidden { get; set; }

        public List<KeyValuePair<string,string>> FieldValues { get; set; }

        public SPDataField()
        {
            FieldValues = new List<KeyValuePair<string,string>>();
        }

        public override string ToString()
        {
            if (Hidden)
                return string.Format("({0})", this.DisplayName);
            else
                return this.DisplayName;
        }
    }
}
